home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef _SOUND_H_
- #define _SOUND_H_
-
-
- //-----------------------------------------
- //Public variables
- //-----------------------------------------
- extern ALCcontext *Context;
- extern ALCdevice *Device;
-
- //-----------------------------------------
- //Public funtions
- //-----------------------------------------
- void InitializeSound();
- void CleanUpSound();
-
-
- //------------------------------------------------------------------
- // Name: SOUND CLASS
- // Desc: ***********
- //------------------------------------------------------------------
- class SOUND
- {
-
- private:
- enum Format {Unknown, MP3, WavMidi,WavMidi3D};
-
-
- //MP3
- IGraphBuilder* m_pGraph;
- IMediaControl* m_pMediaControl;
- IMediaPosition* m_pMediaPosition;
-
- //Wav3D
- char* alBuffer;
- ALenum alFormatBuffer;
- ALsizei alFreqBuffer;
- long alBufferLen;
- unsigned int alSource;
- unsigned int alSampleSet;
-
- Format m_enumFormat;
- bool Sound3DEnabled;
-
- public:
-
-
- bool Stop();
- bool Play(bool Loop = false);
- void SetPosition(VECTOR3D Point,float Scale);
- bool LoadSound(char* szSoundFilePath);
- void InitialiseForWavMidi();
- void InitialiseForWavMidi3D();
- void InitialiseForMP3();
-
- SOUND();
- virtual ~SOUND();
-
- };
-
-
-
-
- #endif //_SOUND_H_